import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
// import PublicUI from '@/public-components'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/element/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n

import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

import '@/filter/index'

// import dayjs from 'dayjs'

import consts from './consts'

import tools from '@/utils/tools'


import {resetForm} from '@/utils/badao'
Vue.prototype.resetForm = resetForm

// 开发环境

if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}


// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI)
// Vue.use(PublicUI)

// 开发模式下跳转路径初始化
// if (process.env.NODE_ENV === 'development') {
//   console.log(process.env.VUE_APP_MANAGE_URL);
//   // process.env.VUE_APP_MANAGE_URL = `http://` + window.location.hostname + `:9529/bdi-dt/manage/#/`
//   // process.env.VUE_APP_FRONT_URL = `http://` + window.location.hostname + `:9530/bdi-dt/front/#/`
//   // process.env.VUE_APP_INDEX_URL = `http://` + window.location.hostname + `:9528/`
// }

Vue.prototype.$consts = consts

Vue.prototype.$tools = tools


new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
})
